var app=require('express')();
var chaxun=require('./mysql.js');

app.get('/api/rtimu',async function(req,res){
	res.append("Access-Control-Allow-Origin","*")
	res.append("Access-Control-Allow-Content-Type","*")
	let page=req.query.page?req.query.page:2;
	let str=`select * from quizzes limit ${page*10},10`;
	let result=await chaxun(str);
	res.json(result);
})
app.listen(8083,function(){
	console.log('服务启动成功，访问：http://localhost:8083')
})